﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="ShowAddtime.aspx.cs" Inherits="EmployeeCheckIn.ShowAddtime" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .TALeft
        {
            text-align: center;
        }
        .style1
        {
            width: 93%;
            height: 91px;
        }
        .style9
        {
            height: 28px;
            padding: 20px;
        }
        .style11
        {
            height: 10px;
        }
        .style12
        {
            width: 15px;
        }
        .style14
        {
            width: 15px;
            height: 49px;
        }
        .style15
        {
            height: 49px;
        }
        .style16
        {
            height: 49px;
            width: 193px;
        }
        .style17
        {
            width: 193px;
        }
        .style18
        {
            height: 49px;
            width: 140px;
        }
        .style19
        {
            width: 15px;
            height: 35px;
        }
        .style20
        {
            width: 193px;
            height: 35px;
        }
        .style21
        {
            height: 35px;
        }
        .style22
        {
            width: 15px;
            height: 29px;
        }
        .style23
        {
            width: 193px;
            height: 29px;
        }
        .style24
        {
            height: 29px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table class="style1" align="center">
        <tr>
            <td align="left" class="style9">
                <asp:Label ID="Label1" runat="server" Font-Size="Large" Text="เพิ่มเวลาพนักงาน" ForeColor="Black"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="center" class="style11">
                <table style="width: 100%; height: 106px;">
                    <tr>
                        <td class="style14">
                            &nbsp;
                        </td>
                        <td class="style16">
                            <asp:Label ID="Label6" runat="server" Text="รหัสพนักงาน : "></asp:Label>
                            <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" Height="20px"
                                Width="100px" DataSourceID="LinqDataSource1" DataTextField="EMP_CODE" DataValueField="EMP_ID"
                                OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
                            </asp:DropDownList>
                        </td>
                        <td class="style18">
                            <asp:Label ID="Label10" runat="server" Text="ชื่อ : "></asp:Label>
                            <asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True" DataSourceID="LinqDataSource1"
                                DataTextField="EMP_FIRSTNAME" Height="20px" Width="100px" DataValueField="EMP_ID"
                                OnSelectedIndexChanged="DropDownList2_SelectedIndexChanged">
                            </asp:DropDownList>
                        </td>
                        <td class="style15">
                            <asp:Label ID="Label7" runat="server" Text="วันที่ : "></asp:Label>
                        </td>
                        <td colspan="2" class="style15">
                            <asp:TextBox ID="TextBox2" runat="server" class="dateInput" Height="24px" Width="140px"
                                onfocus="javascript: if(this.value != 'A new value'){ this.value = ''; }" onblur="javascript: if(this.value==''){this.value='';}"></asp:TextBox>
                        </td>
                        <td class="style15">
                            <asp:Label ID="Label3" runat="server" Text="เวลาเข้า : "></asp:Label>
                            <asp:TextBox ID="txt_InTime" runat="server" Height="25px" Width="50px"></asp:TextBox>
                        </td>
                        <td class="style15">
                            <asp:Label ID="Label5" runat="server" Text="เวลาออก : "></asp:Label>
                            <asp:TextBox ID="txt_OutTime" runat="server" Height="25px" Width="50px"></asp:TextBox>
                        </td>
                        <td class="style15">
                            <asp:Button ID="Button1" runat="server" Text="เพิ่ม" Height="25px" Width="60px" OnClick="Button1_Click"
                                OnClientClick="if(!confirm('ยืนยันการบันทึกข้อมูล')) return false;" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style22">
                            &nbsp;
                        </td>
                        <td align="right" class="style23">
                            <asp:Label ID="Label8" runat="server" Text="เพิ่มจาก Excel "></asp:Label>
                        </td>
                        <td align="left" colspan="6" class="style24">
                            <asp:FileUpload ID="FileUpload_Excel" runat="server" />
                            &nbsp;&nbsp;
                            <asp:RegularExpressionValidator ID="regexValidator" ValidationGroup="V1" runat="server" ControlToValidate="FileUpload_Excel"
                                ErrorMessage="Only Excel 2003 are allowed" ValidationExpression="(.*\.([Xx][Ll][Ss])|$)"
                                ForeColor="Red">
                           </asp:RegularExpressionValidator>
                        </td>
                        <td class="style24">
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td class="style19">
                        </td>
                        <td align="right" class="style20">
                        </td>
                        <td align="left" colspan="6" class="style21">
                            <asp:Button ID="BtUpload" runat="server" OnClick="BtUpload_Click" ValidationGroup="V1" Text="Upload" Height="25px"
                                Width="60px" OnClientClick="if(!confirm('ยืนยันการอัพโหลด')) return false;" />
                        </td>
                        <td class="style21">
                        </td>
                    </tr>
                    <tr>
                        <td class="style12">
                            &nbsp;
                        </td>
                        <td align="right" class="style17">
                            <asp:Label ID="Label9" runat="server" Text="ดาวน์โหลดตัวอย่าง Excel "></asp:Label>
                        </td>
                        <td align="left" colspan="3">
                            <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="Download" Height="25px"/>
                        </td>
                        <td align="left" colspan="3">
                            <asp:Label ID="lbwarn" runat="server" ForeColor="Red"></asp:Label>
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="EmployeeCheckIn.linqEMPLOYEEDataContext"
                    Select="new (EMP_CODE, EMP_FIRSTNAME, EMP_ID)" TableName="EMPLOYEEs">
                </asp:LinqDataSource>
            </td>
        </tr>
        <tr>
            <td align="left" class="style9">
                <asp:Button ID="Button3" runat="server" Text="กลับสู่หน้าหลัก" OnClick="Button3_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
